package com.dd.duu.controller;

import com.dd.duu.service.TestClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述:
 *
 * @author: yanglin
 * @Date: 2021-03-03-13:49
 * @Version: 1.0
 */
@Slf4j
@RestController
@RequestMapping("/t/")
public class TestUiController {

    @Autowired
    TestClient testClient;

    @GetMapping("/queryTestStr")
    public String queryTestStr(){
        log.info("欢迎你访问Feign客戶端接口");
        return testClient.queryTest();
    }

    @GetMapping("/queryTestStr/{name}")
    public String queryTestStr(@PathVariable String name){
        log.info("欢迎你访问Feign客戶端接口");
        return testClient.queryTestStr(name);
    }
}
